// ChapterHelper.h: interface for the CChapterHelper class.
//
//////////////////////////////////////////////////////////////////////

#pragma once

#include "RewriteSrt.h"
#include "SmallUtilz.h"

class CChapterHelper:CRewriteSrt
{
public:
	TCHAR * ms2TimeStr(int ms0);
	int timeStr2ms(LPCTSTR lp);
	void insertTimeAscending(CStringArray &csa, LPCTSTR lp);
	bool writeSrtChapter(LPCTSTR lpSrt, CStringArray &csa, int duration);
	bool readSrtChapter(LPCTSTR lpSrt, CStringArray &csa);
	bool isValidTime(LPCTSTR lp);
	bool readOGMChapter(LPCTSTR ogm, CStringArray &csa);
	CChapterHelper();
	virtual ~CChapterHelper();
	static const int ciMAXCHAPTERFILESIZE;

protected:
	int readOGMline(CString &cs, int &no, CString &value);
};
